/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.skycode.core.hibernate.dao;

import com.skycode.core.exception.DAOException;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @author SkyCode (skycode@gmail.com)
 * @since 07/02/2014
 * @version 1.0
 */
public interface DAOSkycode<Dto> {

    public void refresh(Dto dto) throws DAOException;

    public void flush() throws DAOException;

    public void saveOrUpdate(Dto dto) throws DAOException;

    public void save(Dto dto) throws DAOException;

    public void update(Dto dto) throws DAOException;

    public void delete(Dto dto) throws DAOException;

    public List<Dto> listarTodosDtos(Class<Dto> entityClass) throws DAOException;

    public Dto obtenerDtoPorId(Class c, Serializable id) throws DAOException;

    public void guardarColeccion(Collection<?> collection) throws DAOException;

    public void borrarColeccion(Collection<?> collection) throws DAOException;

    public List<Dto> ejecutarQuery(String query) throws DAOException;
}
